package com.xiangban.controller;

import com.xiangban.aop.Permission;
import com.xiangban.model.Insurance;
import com.xiangban.model.dto.InsuranceDto;
import com.xiangban.model.res.ApiResult;
import com.xiangban.service.InsuranceService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Mr. MaYaYun
 * @Data 2021/12/29 10:05
 */
@RestController
@RequestMapping("/insurance")
public class InsuranceController {

    @Autowired
    private InsuranceService insuranceService;

    @RequestMapping("/listInsurancePage")
    @ApiOperation("保单列表")
    @Permission(permission = "admin:insurance:listInsurancePage")
    public ApiResult<Object> listInsurancePage(@RequestBody InsuranceDto insuranceDto){
        return ApiResult.newSuccess(insuranceService.listInsurancePage(insuranceDto));
    }

}
